yVERSION = 3.00_data.hV^$ _datanavbtnsPixels(Courier New, 1, 11, 9, 17, 12, 11, 5, 0 _data.h_navbtnsClassPixels6graphics\vcr.bmp5graphics\vcr.bmpgraphics\vcr.bmpClasscustomVcrtopVCR Buttons with Data Checker _container _datanavbtns "R%U6%C B-#) CBUTHIS SETSESSION REFRESHFORMClick,1!qAQA2c) _datanavbtns Datachecker1 cmdBottom"Arial, 0, 10, 6, 16, 13, 23, 3, 0 graphics\vcr.bmpStandard VCR Buttons _containerDTop = 6 Left = 44 Height = 15 Width = 23 Name = "Datachecker1"  _datanav.vcx _datacheckerPROCEDURE Click THIS.Parent.BeforeRecordPointerMoved GO BOTTOM THIS.Parent.EnableDisableButtons THIS.Parent.RecordPointerMoved ENDPROC PROCEDURE Error Parameters nError, cMethod, nLine This.Parent.Error(nError, cMethod, nLine) ENDPROC  _datanavbtns commandbutton _base.vcx1_navbtns_commandbuttoncmdNext_navbtnsPixels 4% UL%C B- %C 4 H CBUTHIS SETSESSION REFRESHFORMClick,1!qAAA2z)`Top = 0 Left = 72 Height = 24 Width = 24 Picture = graphics\bottom.bmp Name = "Vcrbottom"  Vcrbottom commandbutton _datanav.vcx1 %@ .U/ #6  UTHISPARENTBEFORERECORDPOINTERMOVEDENABLEDISABLEBUTTONSRECORDPOINTERMOVED.4CUNERRORCMETHODNLINETHISPARENTERRORClick,Error1R21 ) _datanavbtns _cmdbottom commandbutton _base.vcx_navbtns: !!F% U`%C B- %C+ .H %C+H H CBUTHIS SETSESSION REFRESHFORMClick,1!qAAAAA2)!_commandbutton _datanavbtnscmdPrior commandbutton _base.vcx_commandbutton _datanavbtns1Top = 0 Left = 78 Height = 24 Width = 26 FontBold = .T. FontName = "Courier New" FontSize = 11 Caption = ">|" TabIndex = 4 ToolTipText = "Bottom" Name = "cmdBottom" PROCEDURE Click THIS.Parent.BeforeRecordPointerMoved SKIP 1 IF EOF() GO BOTTOM ENDIF THIS.Parent.RecordPointerMoved THIS.Parent.EnableDisableButtons ENDPROC PROCEDURE Error Parameters nError, cMethod, nLine This.Parent.Error(nError, cMethod, nLine) ENDPROC Vcrnext1cmdTop commandbutton commandbutton %)_ GUH  H %C+'#6  UTHISPARENTBEFORERECORDPOINTERMOVEDRECORDPOINTERMOVEDENABLEDISABLEBUTTONS.4CUNERRORCMETHODNLINETHISPARENTERRORClick,Error1QA31  )Top = 0 Left = 52 Height = 24 Width = 26 FontBold = .T. FontName = "Courier New" FontSize = 11 Caption = ">" TabIndex = 3 ToolTipText = "Next" Name = "cmdNext" Top = 0 Left = 26 Height = 24 Width = 26 FontBold = .T. FontName = "Courier New" FontSize = 11 Caption = "<" TabIndex = 2 ToolTipText = "Prior" Name = "cmdPrior"  _base.vcx_commandbutton_cmdnext %*` HUI  H %C(#)  UTHISPARENTBEFORERECORDPOINTERMOVEDRECORDPOINTERMOVEDENABLEDISABLEBUTTONS.4CUNERRORCMETHODNLINETHISPARENTERRORClick,Error1QA31  )PROCEDURE Click THIS.Parent.BeforeRecordPointerMoved SKIP -1 IF BOF() GO TOP ENDIF THIS.Parent.RecordPointerMoved THIS.Parent.EnableDisableButtons ENDPROC PROCEDURE Error Parameters nError, cMethod, nLine This.Parent.Error(nError, cMethod, nLine) ENDPROC Width = 104 Height = 24 BorderWidth = 1 BackColor = 192,192,192 skiptable = enabledisableoninit = .T. Name = "_datanavbtns"  container3\Top = 0 Left = 48 Height = 24 Width = 24 Picture = graphics\next.bmp Name = "Vcrnext"  _datanav.vcxdTop = 0 Left = 24 Height = 24 Width = 24 Picture = graphics\previous.bmp Name = "Vcrprevious" _navbtns Vcrprevious commandbutton _datanav.vcx _cmdpreviousYTop = 0 Left = 0 Height = 24 Width = 24 Picture = graphics\top.bmp Name = "Vcrtop" _navbtns commandbutton _datanav.vcx_cmdtop %@ .U/ #)  UTHISPARENTBEFORERECORDPOINTERMOVEDRECORDPOINTERMOVEDENABLEDISABLEBUTTONS.4CUNERRORCMETHODNLINETHISPARENTERRORClick,Error1R31 ) _base.vcx_data.h>$ _datachecker_data.hPixelsgraphics\checker.bmpgraphics\checker.bmpClass containerPROCEDURE Click THIS.Parent.BeforeRecordPointerMoved GO TOP THIS.Parent.RecordPointerMoved THIS.Parent.EnableDisableButtons ENDPROC PROCEDURE Error Parameters nError, cMethod, nLine This.Parent.Error(nError, cMethod, nLine) ENDPROC Top = 0 Left = 0 Height = 24 Width = 26 FontBold = .T. FontName = "Courier New" FontSize = 11 Caption = "|<" TabIndex = 1 ToolTipText = "Top" Name = "cmdTop" skiptable The table to move the record pointer in . enabledisableoninit Whether to enable/disable buttons when first loaded. *recordpointermoved Called each time the record pointer is moved, basically providing a new event for the class. *enabledisablebuttons Enables/disables buttons based on record pointer location. *beforerecordpointermoved Called before record pointer is moved. PROCEDURE refreshform IF NOT EMPTY(this.ManyAlias) AND NOT EMPTY(this.ManyKey) THIS.UpdateMany() &&special handling for 1-Many side if needed. ENDIF DO CASE CASE TYPE('thisformset')=='O' thisformset.Refresh() CASE TYPE('_screen.ActiveForm')=='O' _screen.ActiveForm.Refresh() ENDCASE SELECT (this.LastSelect) RETURN ENDPROC PROCEDURE setsession IF TYPE('_screen.ActiveForm')#'O' RETURN .F. ENDIF IF NOT TYPE('thisformset')=='O' *** SET SESSION TO (_screen.ActiveForm.DataSessionID) ENDIF this.LastSelect=SELECT() IF NOT EMPTY(this.TableAlias) IF NOT USED(this.TableAlias) RETURN .F. ENDIF SELECT (this.TableAlias) ENDIF IF NOT USED() RETURN .F. ENDIF ENDPROC @ ''%UVTTTTUOBTN LASTSELECTTHIS TABLEALIAS MANYALIASMANYKEY}CCCC%CthisformbOvTaUTHIS SETDEFAULTVCRTOP VCRPREVIOUSVCRNEXT VCRBOTTOMTHISFORMSHOWTIPS setdefault,Init1q111121111A3y)'PROCEDURE setdefault LPARAMETERS oBtn oBtn.LastSelect=this.LastSelect oBtn.TableAlias=this.TableAlias oBtn.ManyAlias=this.ManyAlias oBtn.ManyKey=this.ManyKey ENDPROC PROCEDURE Init this.SetDefault(this.VCRTop) this.SetDefault(this.VCRPrevious) this.SetDefault(this.VCRNext) this.SetDefault(this.VCRBottom) IF TYPE('thisform')=='O' thisform.ShowTips=.T. ENDIF ENDPROC manages conflicts_custom _datachecker0Height = 15 Width = 23 Name = "_datachecker" custom _base.vcx _base.vcx"Arial, 0, 10, 6, 16, 13, 23, 3, 0 1 commandbutton _datanav.vcx _cmdnavbtn _datanav.vcx _base.vcx container _cmdnavbtn1Width = 48 Height = 25 Name = "_basicnavbtns" llastselect Last selected work area. tablealias Alias of workarea. manyalias Alias manykey *setdefault Width = 97 Height = 25 BackStyle = 0 BorderWidth = 0 lastselect = 1 tablealias = manyalias = manykey = builder = vcrtlbrb.scx Name = "_navbtns" lastselect Last selected alias. tablealias Table alias to move record pointer. manyalias Alias of child table in 1-Many form. manykey Key of child table in 1-Many form. *setdefault  %  EU6#%C_VFP.ActiveFormbO/ CU ACTIVEFORMREFRESHX%CCC+ ?CEnabled-B TCO#) TCO#6 TCO # HQ T-T-TaT a 1TaTaT-T -2QCEnabledaU NRECNTOPNBOTTOMTHISSETALLCMDTOPENABLEDCMDPRIORCMDNEXT CMDBOTTOM'%C  FUTHIS SKIPTABLE4 H/  )TCDBF Select Table:Open%C0F QTCT 1TC %R, Data Conflict2fTError Number: CCZC C Error Message: CEC C  Procedure: CtTC2x H   X2BU NERRORCMETHODNLINE CNEWTABLENCONFLICTSTATUSLCMSGLNANSWERTHIS SKIPTABLE DATACHECKER1CHECKCONFLICTS!% UTHISENABLEDISABLEONINITENABLEDISABLEBUTTONSrecordpointermoved,enabledisablebuttons{beforerecordpointermoved)ErroreInit11A3AAAQQA21A32A!DqAfAAAAAA3A1a3$#O*A O Y) X%U wUVTTTTUOBTN LASTSELECTTHIS TABLEALIAS MANYALIASMANYKEYWCC%CthisformbOPTaUTHIS SETDEFAULT VCRPREVIOUSVCRNEXTTHISFORMSHOWTIPS setdefault,Init1q1111311A2: )_cmdnext _cmdnavbtn Vcrpreviousgraphics\next.bmpgraphics\next.bmp*handlerecord Compares the current value, old value, and original value of each field, displaying a messagebox if a change or conflict is detected. *string Returns type 'c' equivalent of passed value *verifychanges Prompts a user to save all changes made to a table or record. *verifyeachchange Prompts a user to confirm each change he or she made. *checkconflicts Notifies a user if someone else has changed the data in the table after he or she began editing a record. Abstract VCR command button.Class_commandbutton _cmdnavbtntablealias Table alias to move record pointer. manyalias Alias of child table in 1-Many form. manykey Key of child table in 1-Many form. lastselect Last selected alias. *refreshform Refreshes current form. *setsession *updatemany Height = 24 Width = 29 FontSize = 10 Caption = "" ForeColor = 0,0,0 tablealias = manyalias = manykey = lastselect = 1 Name = "_cmdnavbtn"  commandbutton _base.vcxPixels"Arial, 0, 10, 6, 16, 13, 23, 3, 0  _basicnavbtnsgraphics\vcr.bmpClass_cmdtop1graphics\vcr.bmpClass _containerVcrnextPixels _cmdprevious"Arial, 0, 10, 6, 16, 13, 14, 3, 0  _datanav.vcxgraphics\top.bmpVCR Top. _cmdnavbtn_cmdtop commandbuttonPixels commandbutton _cmdbottomnPROCEDURE Click IF NOT this.SetSession() RETURN .F. ENDIF GO TOP this.RefreshForm() RETURN ENDPROC  _datanav.vcxClassClassdHeight = 24 Width = 29 Picture = graphics\bottom.bmp ToolTipText = "Bottom" Name = "vcrbottom" graphics\bottom.bmpxHeight = 24 Width = 29 Picture = graphics\top.bmp Caption = "" TabIndex = 1 ToolTipText = "Top" Name = "_cmdtop" "Arial, 0, 10, 6, 16, 13, 14, 3, 0 qPROCEDURE Click IF NOT this.SetSession() RETURN .F. ENDIF GO BOTTOM this.RefreshForm() RETURN ENDPROC graphics\bottom.bmpPixels _cmdpreviousgraphics\previous.bmp_cmdnext _cmdbottom"Arial, 0, 10, 6, 16, 13, 14, 3, 0 graphics\top.bmp_Height = 24 Width = 29 Picture = graphics\next.bmp ToolTipText = "Next" Name = "_cmdnext"  _datanav.vcx commandbuttoncTop = 0 Left = 0 Height = 24 Width = 24 Picture = graphics\previous.bmp Name = "Vcrprevious" graphics\previous.bmp _cmdnavbtn _cmdpreviousClass _basicnavbtns\Top = 0 Left = 24 Height = 24 Width = 24 Picture = graphics\next.bmp Name = "Vcrnext"  _basicnavbtns commandbutton_cmdnext _basicnavbtnsPROCEDURE Click IF NOT this.SetSession() RETURN .F. ENDIF IF NOT BOF() SKIP -1 ENDIF this.RefreshForm() RETURN ENDPROC kHeight = 24 Width = 29 Picture = graphics\previous.bmp ToolTipText = "Previous" Name = "_cmdprevious"  commandbutton _datanav.vcx"Arial, 0, 10, 6, 16, 13, 14, 3, 0 PixelsPROCEDURE Click IF NOT this.SetSession() RETURN .F. ENDIF IF NOT EOF() SKIP ENDIF IF EOF() SKIP -1 ENDIF this.RefreshForm() RETURN ENDPROC  "R%U6%C B-#6 CBUTHIS SETSESSION REFRESHFORMClick,1!qAQA2f)EPROCEDURE setdefault LPARAMETERS oBtn oBtn.LastSelect=this.LastSelect oBtn.TableAlias=this.TableAlias oBtn.ManyAlias=this.ManyAlias oBtn.ManyKey=this.ManyKey ENDPROC PROCEDURE Init this.SetDefault(this.VCRPrevious) this.SetDefault(this.VCRNext) IF TYPE('thisform')=='O' thisform.ShowTips=.T. ENDIF ENDPROC  %GU %C C - C H> C thisformsetbOj C& C_screen.ActiveFormbOC9 FBUTHIS MANYALIASMANYKEY UPDATEMANY THISFORMSETREFRESH ACTIVEFORM LASTSELECT&%C_screen.ActiveFormbO-B- %C thisformsetbO QTCW%C %C B- F %C B-UTHIS LASTSELECT TABLEALIAS refreshform, setsession;1AaAA3aqAB11qAAqA2N o) f% # UO%C m.lnScopebN3T %C  >R,4Invalid value passed to conflictmanager.handlerecord# T - T a%C SourceType C (C.T T C /%C bGM.T C _T C  H %   T aT C)A value has been changed by another user.C Field: C Record Number: CCCOZCC m.lcFieldbM}C C Original Value: C  C Current Value: C  C  Your change: CC  &C C   is a Memo field.6C C <Do you want to overwrite the current value with your change?C 0(Choose 'Cancel' to restore the original value.)3 Data Conflictx T C $%      T aT CA value has been changed.C Field:  C Record Number: CCCOZCC m.lcFieldbM}C C Original Value: C  C Current Value: C  C  Your change: CC  &C C   is a Memo field.6C C <Do you want to overwrite the current value with your change?C 0(Choose 'Cancel' to restore the original value.)3Verify Changesx H >   >  % 7T C-aBC 6H BU LNSCOPELNCHOICELNFIELDLCFIELDLUOLDVALLUCURVALLUFIELD LLMADECHANGE LLSUCCESSTHISSTRING'T C m.luValueb H5  CV BC  C NY~BCC Z D BC * TBC m.luValue LBC .T..F.6 M B Memo fieldULUVALUEUTYPE T -T  H8! CC Buffering%2C| T a! CC Buffering%C T a2 R,:% yET C!Do you want to save your changes?$ Save Changesx% cT CCaa6u Ca B ULNCHOICE LLMADECHANGE LNSUCCESS NOBUFF_LOC1 T  H'! CC Bufferingx%2CtT C! CC Buffering T C+  # *T C  C6T C 2 R,: B U LNSUCCESSLNRECTHIS HANDLERECORD NOBUFF_LOC1 T  H'! CC Bufferingx%2CtT C! CC Buffering T C+  # *T C  C6T C 2 R,: B U LNSUCCESSLLNRECTHIS HANDLERECORD NOBUFF_LOC handlerecord,string verifychanges#verifyeachchange checkconflictsH 1AA2A2aAAAA2QVA21AAA1A1AAAA3zqAAAQA!1A2aAAAAQ1AA2aaA!AAAA2aaA!AAAA1: 1W ZCw\"o )PROCEDURE handlerecord *---------------------------------------------------------------* * This method is called from the CheckConflicts method and the * VerifyEachChange method. It loops through each field in the * current record and compares the current value with the value * stored in the table. If a value of 1 is passed to this method, * the method also compares the current value with the value in * the field before user made any edits. * * RETURNS NUMERIC VALUES: * 0 -- No Change Made to the Current Value * 1 -- Successfully Made User-Specified Change * 2 -- Unable to Make User-Specifed Change *---------------------------------------------------------------* LPARAMETERS lnScope *--Valid values for lnScope: * 0 - Only manage conflicts && default * 1 - Also prompt for changed values * Verify parameter IF TYPE("m.lnScope") != "N" m.lnScope = 0 ENDIF IF !BETWEEN(m.lnScope, 0, 1) WAIT WINDOW WINDMSG_LOC ENDIF LOCAL lnChoice, lnField, lcField, luOldVal, luCurVal, luField, llMadeChange, llSuccess m.llMadeChange = .F. m.llSuccess = .T. * refresh current record in views before checking for conflicts IF CURSORGETPROP('SourceType') != 3 && not a local table =REFRESH() ENDIF * Check each field in the record for conflict or value change FOR m.lnField = 1 to FCOUNT() m.lnChoice = 0 m.lcField = FIELD(m.lnField) IF TYPE(m.lcField) = "G" LOOP && Can't check general fields ENDIF m.luOldVal = OLDVAL(m.lcField) m.luCurVal = CURVAL(m.lcField) DO CASE * -----< check for conflicts only >-------- CASE m.lnScope = 0 IF m.luOldVal != m.luCurVal m.llMadeChange = .T. m.lnChoice = MESSAGEBOX(VALCHG1_LOC + CR_LOC + FIELD_LOC + lcField + CR_LOC + ; RECORD_LOC + ALLTRIM(STR(RECNO())) + ; IIF(TYPE("m.lcField") != "M", CR_LOC + CR_LOC + ORG_LOC + THIS.String(m.luOldVal) + ; CR_LOC + CUR_LOC + THIS.String(m.luCurVal) + ; CR_LOC + CHG_LOC + THIS.String(EVAL(m.lcField)), CR_LOC + CR_LOC + m.lcField + MEMO_LOC) + ; CR_LOC + CR_LOC + SAVE_LOC, + 3+48+0, CONFLICT_LOC) ENDIF * -----< check for conflicts and verify all changes >-------- CASE m.lnScope = 1 && Verify all changes m.luField = EVAL(m.lcField) IF m.luOldVal != m.luField OR m.luCurVal != m.luField m.llMadeChange = .T. m.lnChoice = MESSAGEBOX(VALCHG2_LOC + CR_LOC + FIELD_LOC + m.lcField + CR_LOC + ; RECORD_LOC + ALLTRIM(STR(RECNO())) + ; IIF(TYPE("m.lcField") != "M", CR_LOC + CR_LOC + ORG_LOC + THIS.String(m.luOldVal) + ; CR_LOC + CUR_LOC + THIS.String(m.luCurVal) + ; CR_LOC + CHG_LOC + THIS.String(EVAL(m.lcField)), CR_LOC + CR_LOC + m.lcField + MEMO_LOC) + ; CR_LOC + CR_LOC + SAVE_LOC, + 3+48+0, VERIFY_LOC) ENDIF ENDCASE DO CASE CASE m.lnChoice = 7 && No, don't save changes REPLACE (m.lcField) WITH m.luCurVal CASE m.lnChoice = 2 && Cancel, restore original value REPLACE (m.lcField) WITH m.luOldVal ENDCASE ENDFOR IF m.llMadeChange m.llSuccess = TABLEUPDATE(.F., .T.) RETURN IIF(m.llSuccess, 1, 2) ELSE RETURN 0 ENDIF ENDPROC PROCEDURE string *---------------------------------------------------------------* * This method is called from the HandleRecord method. It * returns the character equivalent of the value passed in as a * parameter. If a memo field is passed in, a notice to this * effect is returned rather than the value in the memo field so * that potentially large amounts of text aren't displayed in the * messagebox. *---------------------------------------------------------------* LPARAMETERS luValue LOCAL uType m.uType = TYPE('m.luValue') DO CASE CASE m.uType = 'C' RETURN ALLTRIM(m.luValue) CASE INLIST(m.uType, 'N', 'Y') RETURN ALLTRIM(STR(m.luValue)) CASE m.uType = 'D' RETURN DTOC(m.luValue) CASE m.uType = 'T' RETURN TTOC('m.luValue') CASE m.uType = 'L' RETURN IIF(m.luValue, '.T.', '.F.') CASE uType = 'M' RETURN 'Memo field' ENDCASE ENDPROC PROCEDURE verifychanges *---------------------------------------------------------------* * If any changes have been made to the table or record, prompt the * user to save the changes. If the user says 'yes,' all changes * are saved. Any changes made to the data by other users after * this user made the change and before the change was committed * will be lost. * * RETURNS NUMERIC VALUES: * 0 -- No Changes Made to the Current Values * 1 -- Successfully Made All User Changes * 2 -- Unable to Write One or More User-Specifed Changes to Table *---------------------------------------------------------------* LOCAL lnChoice, llMadeChange, lnSuccess m.llMadeChange = .F. m.lnSuccess = 0 * If the user has changed anything, prompt to save or discard changes DO CASE CASE INLIST(CURSORGETPROP('Buffering'), 2,3) && Row Buffering IF '2' $ GETFLDSTATE(-1) m.llMadeChange = .T. ENDIF CASE INLIST(CURSORGETPROP('Buffering'), 4,5) && Table Buffering IF GETNEXTMODIFIED(0) > 0 m.llMadeChange = .T. ENDIF OTHERWISE WAIT WINDOW NOBUFF_LOC NOWAIT ENDCASE IF m.llMadeChange m.lnChoice = MESSAGEBOX(SAVECHG_LOC, 4+32, SAVECHG2_LOC) IF m.lnChoice = 6 && Yes m.lnSuccess = IIF(TABLEUPDATE(.T.,.T.), 1, 2) ELSE =TABLEREVERT(.T.) ENDIF ENDIF RETURN m.lnSuccess ENDPROC PROCEDURE verifyeachchange *-------------------------------------------------------------------- * If any changes have been made to the table or record, for each * change, display the old value and the new value, prompting the * user to save or discard the change. Conflict management is also * included in the HandleRecord method. * * RETURNS NUMERIC VALUES: * 0 -- No Changes Made to the Current Values * 1 -- Successfully Made User-Specified Changes * 2 -- Unable to Write One or More User-Specifed Changes to Table *---------------------------------------------------------------* LOCAL lnSuccess, lnRec m.lnSuccess = 0 DO CASE CASE INLIST(CURSORGETPROP('Buffering'), 2,3) && Row Buffering IF '2' $ GETFLDSTATE(-1) && Data has changed m.lnSuccess = THIS.HandleRecord(1) ENDIF CASE INLIST(CURSORGETPROP('Buffering'), 4,5) && Table Buffering m.lnRec = GETNEXTMODIFIED(0) DO WHILE m.lnRec > 0 GO m.lnRec m.lnSuccess = IIF(m.lnSuccess != 2, THIS.HandleRecord(1), 2) m.lnRec = GETNEXTMODIFIED(m.lnRec) ENDDO OTHERWISE && No Buffering WAIT WINDOW NOBUFF_LOC NOWAIT ENDCASE RETURN m.lnSuccess ENDPROC PROCEDURE checkconflicts *---------------------------------------------------------------* * Checks to see whether another user has changed the value * stored in a table. If so, calls HandleRecord to display * the new value and allow the user to decide what to do. * * RETURNS NUMERIC VALUES: * 0 -- No Changes Made to the Current Values * 1 -- Successfully Made User-Specified Changes * 2 -- Unable to Make Write One or More User-Specifed Changes to Table *---------------------------------------------------------------* LOCAL lnSuccess, llnRec m.lnSuccess = 0 DO CASE CASE INLIST(CURSORGETPROP('Buffering'), 2,3) && Row Buffering IF '2' $ GETFLDSTATE(-1) && Data has changed m.lnSuccess = THIS.HandleRecord(0) ENDIF CASE INLIST(CURSORGETPROP('Buffering'), 4,5) && Table Buffering m.llnRec = GETNEXTMODIFIED(0) DO WHILE m.llnRec > 0 GO m.llnRec m.lnSuccess = IIF(m.lnSuccess != 2, THIS.HandleRecord(0), 2) m.llnRec = GETNEXTMODIFIED(m.llnRec) ENDDO OTHERWISE && no buffering WAIT WINDOW NOBUFF_LOC NOWAIT ENDCASE RETURN m.lnSuccess ENDPROC  ZPROCEDURE recordpointermoved IF TYPE('_VFP.ActiveForm') = 'O' _VFP.ActiveForm.Refresh ENDIF ENDPROC PROCEDURE enabledisablebuttons LOCAL nRec, nTop, nBottom IF EMPTY(ALIAS()) OR EOF() && Table empty or no records match a filter THIS.SetAll("Enabled", .F.) RETURN ENDIF nRec = RECNO() GO TOP nTop = RECNO() GO BOTTOM nBottom = RECNO() GO nRec DO CASE CASE nRec = nTop THIS.cmdTop.Enabled = .F. THIS.cmdPrior.Enabled = .F. THIS.cmdNext.Enabled = .T. THIS.cmdBottom.Enabled = .T. CASE nRec = nBottom THIS.cmdTop.Enabled = .T. THIS.cmdPrior.Enabled = .T. THIS.cmdNext.Enabled = .F. THIS.cmdBottom.Enabled = .F. OTHERWISE THIS.SetAll("Enabled", .T.) ENDCASE ENDPROC PROCEDURE beforerecordpointermoved IF !EMPTY(This.SkipTable) SELECT (This.SkipTable) ENDIF ENDPROC PROCEDURE Error Parameters nError, cMethod, nLine LOCAL cNewTable, nConflictStatus, lcMsg, lnAnswer DO CASE CASE nError = 13 && Alias not found *----------------------------------------------------------- * If the user tries to move the record pointer when no * table is open or when an invalid SkipTable property has been * specified, prompt the user for a table to open. *----------------------------------------------------------- cNewTable = GETFILE('DBF', SELTABLE_LOC, OPEN_LOC) IF FILE(cNewTable) SELECT 0 USE (cNewTable) This.SkipTable = ALIAS() ELSE This.SkipTable = "" ENDIF CASE nError = 1585 *----------------------------------------------------------- * Update conflict handled by datachecker class. *----------------------------------------------------------- nConflictStatus = THIS.DataChecker1.CheckConflicts() IF nConflictStatus = 2 WAIT WINDOW CONFLICT_LOC ENDIF OTHERWISE *----------------------------------------------------------- * Display information about an unanticipated error. *----------------------------------------------------------- lcMsg = NUM_LOC + ALLTRIM(STR(nError)) + CR_LOC + CR_LOC + ; MSG_LOC + MESSAGE( )+ CR_LOC + CR_LOC + ; PROG_LOC + PROGRAM(1) lnAnswer = MESSAGEBOX(lcMsg, 2+48+512) DO CASE CASE lnAnswer = 3 &&Abort CANCEL CASE lnAnswer = 4 &&Retry RETRY OTHERWISE RETURN ENDCASE ENDCASE ENDPROC PROCEDURE Init IF THIS.EnableDisableOnInit THIS.EnableDisableButtons ENDIF ENDPROC